import React from 'react'


const Component = () => 
{
    let busid = React.business.id?? 0
    let [guest, SetGuest] = useState([])
    let [type, SetType] = useState(true)
    let [page, SetPage] = useState(1)

    // 下拉刷新
    const onRefresh = async () => 
    {
        SetPage(1)
        SetRoom([])
        SetType(true)

        GetGuest()
    }

    //上拉加载
    const onLoadMore = async () => GetGuest()

    //住户数据
    const GetGuest = async () =>
    {
        var result = await React.request.post('/guest/index', {
            page: page,
            busid: busid,
        })

        console.log(result)
        return false
        if(result.code == 0)
        {
            SetType(false)
            return false
        }

        SetPage(page + 1)
        SetType(true)
        SetRoom(room.concat(result.data.list))
        console.log(SetRoom)
        
    }
    return (
        <>

        </>
    )
}

export default Component